﻿@model IEnumerable<GsifWeb4.ViewModels.MatchStatPerson>

<!-- Avbytare -->
<table width="100%" border="0">
    <tr valign="bottom">
        <td>
            @GsifWeb4.ExtensionMethods.Label("Avbytare:", new { @class = "fatLabel" })
        </td>
    </tr>
    <tr valign="top">
        @{
            var players = Model.Where(stat => stat.Position > (int)ViewData["minPosition"] && stat.Position < (int)ViewData["maxPosition"]);
            var widthEach = Convert.ToInt32(480 / players.Count());
            for (int i = 0; i < players.Count(); i++)
            {
            <td width='<%:widthEach %>'></td>  
            }
        }
    </tr>

    <tr>
    </tr>

    <tr>
        @foreach (var player in players)
        {
            <td align='left' colspan='1'>
                @{Html.RenderPartial("_MatchReportPlayerForm", player);}
            </td>
        }
    </tr>
</table>
